#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

int main( int argc, char *argv[] ){

	FILE *fb = fopen("500k_ob.bin","rb");

	// int num = 20*20*16;
	// int num = (10*10)*16;
	int num = (10*10+1)*16;

	uint32_t *regs = (uint32_t *)malloc(sizeof(uint32_t)*num);

	int num_read = fread(regs, sizeof(uint32_t), num, fb);

	if( num_read != num ){
		printf("Error in reading binary data file 500k_ob.bin\n");
	}

	int i,j;
	int cnt = 0;

	for(i=0; i<num; i++){
		
		uint32_t x = regs[i];

		if( i%16 == 0 ){
			printf("\n");
			printf("(row = %6d) ", cnt);
			cnt++;
		}

//		printf("%u (%d) ", x, (int)x );

		if( i>=16)
		printf("%12u ", x);
		// printf("0X_%08X ", x);

	}

	printf("\n");

	fclose(fb);

}

